{% extends 'admin_base.html' %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load humanize %}
{% load model_functions %}

{% block content %}
{% include "_new_hire_menu.html" %}

{% if resource_user.answers.all|length %}
<div class="card mt-3">
  <div class="card-header">
    <h3 class="card-title">{% translate "Answers" %}</h3>
  </div>
  <div class="card-body">
    {% for chapter in resource_user.resource.chapters.all %}
      {% if chapter.type == 2 %}
        {% for item in chapter.content.blocks %}
          <div class="mb-3">
            <label class="form-label requiredField">{{ item.content }}</label>
            <div>
              {% for option in item.items %}
              <div class="form-check">
                <input type="radio" disabled class="form-check-input" name="item-0" value="temp-d52b" id="id_item-0_0" {% if item.answer == option.id %}checked{% endif %} >
                <label for="id_item-0_0" class="form-check-label">
                  {{ option.text }}
                </label>
              </div>
              {% endfor %}
            </div>
          </div>
          <b> {% translate "Answer given by new hire: " %}{% get_user_answer_by_chapter resource_user chapter forloop.counter0 %} </b>
        {% endfor %}
      {% endif %}
    {% endfor %}
  </div>
</div>

{% else %}
<div class="card mt-3">
  <div class="card-body">
    <p>{% translate "No answers were given in yet." %}</p>
  </div>
</div>
{% endif %}
{% endblock %}
